* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''	1.	25.11.2021	15:35:20	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/db_connection_preference.json'	1.	25.11.2021	15:35:20	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/auth/connection.json'	1.	25.11.2021	15:35:20	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/../nc-preference/.nc-env.json'	1.	25.11.2021	15:35:20	lx	(1. Application process)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'	1.	25.11.2021	15:35:20	lx	(1. Application process)

  database connect time: 0.000 seconds.	25.11.2021	15:35:20	lx	(1. Application process)

* connect: connection changed to 'postgre-demo/fi_demo'	1.	25.11.2021	15:35:20	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/prf/group.json'	1.	25.11.2021	15:35:20	lx	(1. Application process)


error: preference 'system/nc_server_start.json' was not found
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:542: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/dprf.lua:466: in function 'preferenceFromJson'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:44: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:27>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:70: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:19>]
	1.	25.11.2021	15:35:20	lx	(1. Application process)

Tcp server 2 start check: start.	25.11.2021	15:35:20	_lx_SERVER	(1. Application process)

Käynnisteään Tcp palvelin 2.	25.11.2021	15:35:20	_lx_SERVER	(4. palvelin)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''	1.	25.11.2021	15:35:22	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/db_connection_preference.json'	1.	25.11.2021	15:35:22	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/auth/connection.json'	1.	25.11.2021	15:35:22	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/../nc-preference/.nc-env.json'	1.	25.11.2021	15:35:22	lx	(4. palvelin)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'	1.	25.11.2021	15:35:22	lx	(4. palvelin)

  database connect time: 0.000 seconds.	25.11.2021	15:35:22	lx	(4. palvelin)

* connect: connection changed to 'postgre-demo/fi_demo'	1.	25.11.2021	15:35:22	lx	(4. palvelin)


* paths:
 - main: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/'
 - bin : '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/'
 - 4D  : '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/'
	1.	25.11.2021	15:35:22	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/prf/group.json'	1.	25.11.2021	15:35:22	lx	(4. palvelin)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0112bf8df0, size: 400.	25.11.2021	15:35:22	lx	(4. palvelin)

********************* /Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/ *********************.	25.11.2021	15:35:22	lx	(4. palvelin)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'	1.	25.11.2021	15:35:22	lx	(4. palvelin)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0.	25.11.2021	15:35:22	lx	(4. palvelin)

1. Loading plugin: nc/worker/auth_worker	1.	25.11.2021	15:35:22	lx	(4. palvelin)

2. Loading plugin: nc/worker/query_worker	1.	25.11.2021	15:35:22	lx	(4. palvelin)

3. Loading plugin: nc/worker/query4d_worker	1.	25.11.2021	15:35:22	lx	(4. palvelin)

4. Loading plugin: nc/worker/call4d_worker	1.	25.11.2021	15:35:22	lx	(4. palvelin)

All plugins have been loaded	1.	25.11.2021	15:35:22	lx	(4. palvelin)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json.	25.11.2021	15:35:22	lx	(4. palvelin)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''	1.	25.11.2021	15:35:22	lx	(4. palvelin)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''	1.	25.11.2021	15:35:22	lx	(4. palvelin)

Mac address: f84d896921dc	1.	25.11.2021	15:35:22	lx	(4. palvelin)

TLS certificate files: /Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem	1.	25.11.2021	15:35:22	lx	(4. palvelin)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.1.15:5949/
                          https://127.0.0.1:5949/, https://192.168.1.15:5949/	1.	25.11.2021	15:35:22	lx	(4. palvelin)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.1.15:5949/	1.	25.11.2021	15:35:22	lx	(4. palvelin)

--- server started in 0.005 seconds, 2021-11-25 15:35:22, used memory 3137.9 kb ---	5.	25.11.2021	15:35:22	lx	(4. palvelin)

OSX arm64, using: rapidjson_arm	1.	25.11.2021	15:35:22	lx	(4. palvelin)


1. uri: HTTP, POST '/rest/nc/query/sql4d' 2021-11-25 15:35:56
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 856
Content-Uncompressed-Length: 1222

LZ4.	25.11.2021	15:35:56	lx	(4. palvelin)


- rest call: organzation 'demo-4d-0', url '/rest/nc/query/sql4d'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/../nc-preference/.nc-env.json'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

    Connected to: 'Manageri v12 rest4d local, 127.0.0.1:5949, database: 4d, user: manage_demo'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

  database connect time: 0.000 seconds.	25.11.2021	15:35:56	lx	(4. palvelin)

* connect: connection changed from 'postgre-demo/fi_demo' to 'rest4d/4d'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

* organization id 'demo-4d-0', combining redirect preferences: '4d, default'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/../nc-preference/.nc-env.json'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

  database connect time: 0.000 seconds.	25.11.2021	15:35:56	lx	(4. palvelin)

* auth: connection changed from 'rest4d/4d' to 'plg4d/plg4d'	1.	25.11.2021	15:35:56	lx	(4. palvelin)

  - sql execute unsafe 'plg4d/plg4d: company-customer', query: 'nil'
    SELECT pr.product_id, pr.work__position_num_id, pr.name, pr.production_control_type, pr.stock_balance__unit, pr.unit, pr.fixed, pr.reserved, pr.available, pr.re...	1.	25.11.2021	15:35:56	lx	(4. palvelin)

  - sql execute 'plg4d/plg4d: company-customer', query: 'new:form/nc/nc-storage/query/product-reserved.json'
    SELECT pr.product_id, pr.work__position_num_id, pr.name, pr.production_control_type, pr.stock_balance__unit, pr.unit, pr.fixed, pr.reserved, pr.available, pr.re...	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.work__position_num_id'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.production_control_type'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.stock_balance__unit'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.unit'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.fixed'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.reserved'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

warning: unknown field type, field 'pr.available'
	1.	25.11.2021	15:35:56	lx	(4. palvelin)

*** tcp close for sock 88, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 127 bytes ***	1.	25.11.2021	15:37:51	lx	(4. palvelin)

closing socket '88'	1.	25.11.2021	15:37:51	lx	(4. palvelin)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***	1.	25.11.2021	16:37:14	lx	(4. palvelin)

closing socket '73'	1.	25.11.2021	16:37:14	lx	(4. palvelin)

*** tcp close for sock 74, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***	1.	25.11.2021	16:37:14	lx	(4. palvelin)

closing socket '74'	1.	25.11.2021	16:37:14	lx	(4. palvelin)


 -- Server statistics --
answerCount:          1
poll.fd_count:        1
pollCount:            222737
pollInCount:          2
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  4/3
totalBytesReceived:   1127
totalBytesSent:       0	1.	25.11.2021	16:37:14	lx	(4. palvelin)

warning: socket type 'number' is not a table, socket number: 90
	1.	25.11.2021	16:37:14	lx	(4. palvelin)

closing socket '90'	1.	25.11.2021	16:37:14	lx	(4. palvelin)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0112bf8df0.	25.11.2021	16:37:14	lx	(4. palvelin)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0112bf8df0, size: 400.	25.11.2021	16:37:14	lx	(4. palvelin)

--- server stopped ---.	25.11.2021	16:37:14	lx	(4. palvelin)

finalizer: free p1	cdata<void *>: 0x0112bf8df0.	25.11.2021	16:37:14	lx	(4. palvelin)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''	1.	25.11.2021	18:22:24	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/db_connection_preference.json'	1.	25.11.2021	18:22:24	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/auth/connection.json'	1.	25.11.2021	18:22:24	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/../nc-preference/.nc-env.json'	1.	25.11.2021	18:22:24	lx	(1. Application process)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'	1.	25.11.2021	18:22:24	lx	(1. Application process)

  database connect time: 0.000 seconds.	25.11.2021	18:22:24	lx	(1. Application process)

* connect: connection changed to 'postgre-demo/fi_demo'	1.	25.11.2021	18:22:24	lx	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/prf/group.json'	1.	25.11.2021	18:22:24	lx	(1. Application process)


error: preference 'system/nc_server_start.json' was not found
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:542: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/dprf.lua:466: in function 'preferenceFromJson'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:44: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:27>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:70: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:19>]
	1.	25.11.2021	18:22:24	lx	(1. Application process)

Tcp server 2 start check: start.	25.11.2021	18:22:24	_lx_SERVER	(1. Application process)

Käynnisteään Tcp palvelin 2.	25.11.2021	18:22:24	_lx_SERVER	(4. palvelin)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''	1.	25.11.2021	18:22:25	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/db_connection_preference.json'	1.	25.11.2021	18:22:25	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/auth/connection.json'	1.	25.11.2021	18:22:25	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/../nc-preference/.nc-env.json'	1.	25.11.2021	18:22:25	lx	(4. palvelin)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'	1.	25.11.2021	18:22:25	lx	(4. palvelin)

  database connect time: 0.000 seconds.	25.11.2021	18:22:25	lx	(4. palvelin)

* connect: connection changed to 'postgre-demo/fi_demo'	1.	25.11.2021	18:22:25	lx	(4. palvelin)


* paths:
 - main: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/'
 - bin : '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/'
 - 4D  : '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/'
	1.	25.11.2021	18:22:25	lx	(4. palvelin)

* load upper level nc-preference file: '/Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/table/prf/group.json'	1.	25.11.2021	18:22:26	lx	(4. palvelin)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x013b6eb940, size: 400.	25.11.2021	18:22:26	lx	(4. palvelin)

********************* /Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/ *********************.	25.11.2021	18:22:26	lx	(4. palvelin)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'	1.	25.11.2021	18:22:26	lx	(4. palvelin)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0.	25.11.2021	18:22:26	lx	(4. palvelin)

1. Loading plugin: nc/worker/auth_worker	1.	25.11.2021	18:22:26	lx	(4. palvelin)

2. Loading plugin: nc/worker/query_worker	1.	25.11.2021	18:22:26	lx	(4. palvelin)

3. Loading plugin: nc/worker/query4d_worker	1.	25.11.2021	18:22:26	lx	(4. palvelin)

4. Loading plugin: nc/worker/call4d_worker	1.	25.11.2021	18:22:26	lx	(4. palvelin)

All plugins have been loaded	1.	25.11.2021	18:22:26	lx	(4. palvelin)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json.	25.11.2021	18:22:26	lx	(4. palvelin)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''	1.	25.11.2021	18:22:26	lx	(4. palvelin)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''	1.	25.11.2021	18:22:26	lx	(4. palvelin)

Mac address: f84d896921dc	1.	25.11.2021	18:22:26	lx	(4. palvelin)

TLS certificate files: /Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/Documents/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem	1.	25.11.2021	18:22:26	lx	(4. palvelin)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.99.12:5949/
                          https://127.0.0.1:5949/, https://192.168.99.12:5949/	1.	25.11.2021	18:22:26	lx	(4. palvelin)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.99.12:5949/	1.	25.11.2021	18:22:26	lx	(4. palvelin)

--- server started in 0.006 seconds, 2021-11-25 18:22:26, used memory 2984.7 kb ---	5.	25.11.2021	18:22:26	lx	(4. palvelin)

OSX arm64, using: rapidjson_arm	1.	25.11.2021	18:22:26	lx	(4. palvelin)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:23	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:23	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:50	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:51	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Capacity not found, work remaining date date is bigger than capacity last date, : PAKK, kuorm. ryhmä: PAKK.	25.11.2021	18:23:51	ldcap_FREE_CACLULATE	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:56	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:56	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Capacity not found, work remaining date date is bigger than capacity last date, : PAKK, kuorm. ryhmä: PAKK.	25.11.2021	18:23:57	ldcap_FREE_CACLULATE	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:59	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

Alkusaldo on negatiivinen rivillä: 31, tuote 'MA RUNKO'.	25.11.2021	18:23:59	prnc_CALCULATION_RESULT_CHECK	(8. Tuotetilannelaskenta)

